package crystal.workshop;

import java.util.Collection;

import crystal.workshop.ui.StructureDataModel;
import crystal.workshop.ui.StructuresListModel;

public interface StructureSource {
	
	/**
	 * Update all structures loaded from this source.
	 */
	public void updateAll();
	
	/**
	 * Update a specific structure from this source. 
	 * @param struct the structure to update, must have come from this source.
	 * @return true if the structure was updated successfully, false otherwise.
	 */
	public boolean update(StructureDataModel struct);
	
	/**
	 * Get the number of structures managed by this source.
	 * @return the number of structures loaded by this source.
	 */
	public int getNumberOfStructures();
	
	/**
	 * Get the collection of structures managed by this source.
	 * @return the collection so structures.
	 */
	public Collection<? extends StructureDataModel> getStructures();
	
	public StructuresListModel getStructuresList();
	
	// TODO: Get component that displays the options for loading structures.
	
	/**
	 * Get a short name for this structure source instance.
	 * @return a name that gives some info about this source.
	 */
	public String getName();
}
